<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <script src="./promise4.js"></script>
    </head>
    <body>
        <script>
            let p1 = new MyPromise((resolve, reject) => {
                setTimeout(() => {
                    resolve('222');
                }, 1000);
            });
            let p2 = p1.then((res) => console.log(res));
        </script>
    </body>
</html>
